import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'Home',
        component: Home,
        children: [
            {
                path: '/',
                name: 'Index',
                meta: {
                    title: "首页"
                },
                component: () => import('@/views/Index')
            },
            {
                path: '/index',
                name: 'Index',
                meta: {
                    title: "首页"
                },
                component: () => import('@/views/Index')
            },
            {
                path: '/require',
                name: 'require',
                meta: {
                    title: "培养目标"
                },
                component: () => import('@/views/GraduateRequire')
            },
            {
                path: '/login',
                name: 'login',
                meta: {
                    title: "登录"
                },
                component: () => import('@/views/Login')
            }
        ]
    }
]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router
